
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>部门列表</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f4;
      margin: 0;
      padding: 20px;
    }
    h1 {
      text-align: center;
      color: #333;
    }
    table {
      width: 80%;
      margin: 20px auto;
      border-collapse: collapse;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    th, td {
      padding: 12px;
      text-align: center;
      border: 1px solid #ddd;
      background-color: #fff;
    }
    th {
      background-color: #4CAF50;
      color: white;
    }
    tr:nth-child(even) {
      background-color: #f2f2f2;
    }
    tr:hover {
      background-color: #ddd;
    }
    a {
      text-decoration: none;
      color: #4CAF50;
      font-weight: bold;
    }
    a:hover {
      text-decoration: underline;
    }
  </style>
</head>
<body>

<h1>部门列表</h1>
<table>
  <thead>
  <tr>
    <th>部门Id</th>
    <th>部门名称</th>
    <th>操作</th>
  </tr>
  </thead>
  <tbody>
  <c:forEach items="${dept}" var="d">
    <tr>
      <td>${d.getDeptId()}</td>
      <td>${d.getDeptName()}</td>
      <td>
        <a href="findEmpByDeptId?deptId=${d.getDeptId()}">查询旗下员工</a>
      </td>
    </tr>
  </c:forEach>
  </tbody>
</table>

</body>
</html>

